﻿using System;
using System.ComponentModel.DataAnnotations;
using YNTK.Common.Enum;
using YNTK.Common.Util;
using YNTK.Dependency;

namespace YNTK.System.Entitys.Dto.Resources
{
    /// <summary>
    /// 查询管理体系认证业务范围分类请求模型
    /// </summary>
    [SuppressSniffer]
    public class QueryBusinessScopeFilterRequestModel
    {
        /// <summary>
        /// 类型(null.全部 0.大类 1.中类 2.小类)
        /// </summary>
        public BusinessScopeEnum? type { get; set; }

        /// <summary>
        /// 创建时间-起
        /// </summary>
        public DateTime? startTime { get; set; } = null;

        /// <summary>
        /// 创建时间-止
        /// </summary>
        public DateTime? endTime { get; set; } = null;

        /// <summary>
        /// 启用/禁用,1.启用 0.禁用 2.全部
        /// </summary>
        public int? enabledMark { get; set; } = null;

        /// <summary>
        /// 模糊查询,分类名称、英文名称、备注
        /// </summary>
        /// <example></example>
        public string keyword { get; set; } = string.Empty;
    }

    /// <summary>
    /// 管理体系认证业务范围分类树结构数据传输模型
    /// </summary>
    [SuppressSniffer]
    public class BusinessScopeTreeDto: TreeModel
    {
        /// <summary>
        ///类型(0.大类 1.中类 2.小类)
        /// </summary>
        public int type { get; set; }

        /// <summary>
        /// 类型文本
        /// </summary>
        public string typeText { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? creatorTime { get; set; }

        /// <summary>
        /// 创建用户
        /// </summary>
        public string creatorUserId { get; set; }

        /// <summary>
        /// 创建用户姓名
        /// </summary>
        public string creatorUserName { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? lastModifyTime { get; set; }

        /// <summary>
        /// 分类名称
        /// </summary>
        public string name { get; set; }

        /// <summary>
        /// 英文名称
        /// </summary>
        public string englishName { get; set; }

        /// <summary>
        /// 分类内容说明
        /// </summary>
        public string description { get; set; }

        /// <summary>
        /// 排序码
        /// </summary>
        public long? sortCode { get; set; }

        /// <summary>
        /// 启用/禁用,1.启用
        /// </summary>
        public int? enabledMark { get; set; }
    }

    /// <summary>
    /// 添加管理体系认证业务范围分类请求模型
    /// </summary>
    [SuppressSniffer]
    public class AddBusinessScopeRequestModel
    {
        /// <summary>
        /// 类型(0.大类 1.中类 2.小类)
        /// </summary>
        [Required(ErrorMessage = "分类类型唯一标识不能为空")]
        public BusinessScopeEnum type { get; set; }

        /// <summary>
        /// 父级分类id
        /// </summary>
        public string parentId { get; set; }

        /// <summary>
        /// 分类名称
        /// </summary>
        [Required(ErrorMessage = "分类名称不能为空")]
        public string name { get; set; }

        /// <summary>
        /// 英文名称
        /// </summary>
        public string englishName { get; set; }

        /// <summary>
        /// 分类内容说明
        /// </summary>
        public string description { get; set; }

        /// <summary>
        /// 排序码
        /// </summary>
        public long? sortCode { get; set; }

        /// <summary>
        /// 启用/禁用,1.启用
        /// </summary>
        public int? enabledMark { get; set; }
    }

    /// <summary>
    /// 修改管理体系认证业务范围分类请求模型
    /// </summary>
    [SuppressSniffer]
    public class UpdateBusinessScopeRequestModel: AddBusinessScopeRequestModel
    {
        /// <summary>
        /// id
        /// </summary>
        [Required(ErrorMessage = "唯一标识不能为空")]
        public string id { get; set; }
    }

}
